package chixing.day04;

public class PersonTest {
    public static void main(String[] args) {
        Person person1 = new Person();
        person1.setName("张三");
        person1.setAge(27);
        person1.setSex("男");
        person1.setIsMarried(false);
        Person person2 = new Person();
        person2.setName("王五");
        person2.setAge(28);
        person2.setSex("女");
        person2.setIsMarried(false);
        boolean canMarry = Person.isCanMarry(person1, person2);
        if (canMarry) {
            System.out.println("可以结婚");
        } else {
            System.out.println("不可以结婚");
        }
    }
}

